package com.example.demo.repository;

import com.example.demo.domain.Code;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

/**
 * 字典值管理Repository
 * @Author zhengmf
 * @Date 2018/12/28  16:36
 */
@Repository
public interface CodeRepository extends JpaRepository<Code,Long> {
    @Modifying
    @Query(value = "UPDATE CODETBL SET STATUS = :status WHERE CODEID = :id",nativeQuery =true)
    void updateStatus(@Param(value = "status") String status, @Param(value = "id") Long id);
}
